Skip to content

Instantly share code, notes, and snippets.

@mjbalcueva
mjbalcueva / calendar.tsx
Last active May 10, 2024 16:58
shadcn ui calendar custom year and month dropdown
"use client"
import * as React from "react"
import { buttonVariants } from "@/components/ui/button"
import { ScrollArea } from "@/components/ui/scroll-area"
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
import { cn } from "@/lib/utils"
import { ChevronLeft, ChevronRight } from "lucide-react"
import { DayPicker, DropdownProps } from "react-day-picker"
@mjbalcueva
mjbalcueva / password-input.tsx
Last active May 10, 2024 16:58
shadcn ui custom password input
"use client"
import { forwardRef, useState } from "react"
import { EyeIcon, EyeOffIcon } from "lucide-react"
import { Button } from "@/components/ui/button"
import { Input, InputProps } from "@/components/ui/input"
import { cn } from "@/lib/utils"
const PasswordInput = forwardRef<HTMLInputElement, InputProps>(
({ className, ...props }, ref) => {
@txhammer68
txhammer68 / linux.md
Last active May 10, 2024 16:57
Linux Tips

Linux Tips (Debian Based distros)

Some usefull tips i have collected over the years, use at own risk.

  • Users & Groups

    • Add user to group
      sudo usermod -a -G cdrom userName
      sudo usermod -aG vboxsf $USER
  • Change root password
    sudo passwd root

@Zeinok
Zeinok / wine-breeze-dark-theme.md
Last active May 10, 2024 16:57
Breeze Dark theme for Wine

Made possible with this reddit post.

Install

wine regedit wine-breeze-dark.reg

Uninstall (Reset Wine color scheme)

wine regedit wine-reset-theme.reg

@htruong
htruong / chroot-to-pi.sh
Last active May 10, 2024 16:54
Chroot to pi sd card
#!/bin/bash
# This script allows you to chroot ("work on")
# the raspbian sd card as if it's the raspberry pi
# on your Ubuntu desktop/laptop
# just much faster and more convenient
# credits: https://gist.github.com/jkullick/9b02c2061fbdf4a6c4e8a78f1312a689
# make sure you have issued
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 10, 2024 16:54
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@0xdevalias
0xdevalias / _deobfuscating-unminifying-obfuscated-web-app-code.md
Last active May 10, 2024 16:52
Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code
@phillip-le
phillip-le / assert-to-have-received-put-command-command.ts
Last active May 10, 2024 16:52
Unit Testing AWS SDK in TypeScript
it('should persist user to dynamodb', async () => {
await createUser(userInput);
expect(mockDynamoDbDocumentClient).toHaveReceivedCommandWith(PutCommand, {
TableName: 'TestUserTable',
Item: userToCreate,
});
});
@Yimiprod
Yimiprod / difference.js
Last active May 10, 2024 16:49
Deep diff between two object, using lodash
/**
* This code is licensed under the terms of the MIT license
*
* Deep diff between two object, using lodash
* @param {Object} object Object compared
* @param {Object} base Object to compare with
* @return {Object} Return a new object who represent the diff
*/
function difference(object, base) {
function changes(object, base) {
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 10, 2024 16:49
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname